<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1{
            color: rgba(255,0,0,0.5);
        }

        div{
            width: 200px;
            height: 200px;
            background-color: aquamarine;
        }
        #d2{
            width: 300px;
            height: 300px;
            background-color: #e8e8e8;
            /*设置背景图片*/
            background-image: url("../day02/red.jpg");
            /*设置背景图片大小*/
            background-size: 250px 250px;
            /*禁止复用*/
            background-repeat: no-repeat;
            /*控制背景图片的位置:    横向  纵向*/
            /*background-position: 20px 50px;*/
            background-position: 50% 100%;/*百分比指的是上级元素的百分比*/

        }
        #d3{
            width: 1080px;
            height: 493px;
            background-color: cyan;
            background-image: url("img/cozy.jpg");
            background-size: 1080px 493px;


        }
    </style>
</head>
<body>
<div id="d2"></div>
<div id="d3"></div>
<div>
    <h1>颜色测试</h1>
</div>

</body>
</html>